package com.pine.dcts.core.impl;

import com.alibaba.datax.common.constant.PluginType;
import com.alibaba.datax.common.util.Configuration;
import com.alibaba.datax.core.util.container.CoreConstant;
import com.pine.dcts.core.IPluginConfigHandler;

/**
 * @author xiaoyuan
 * @create 2021/1/8 16:12
 **/
public class CoreConfigHandler implements IPluginConfigHandler {
    @Override
    public void supplementConfig(PluginType pluginType, Configuration configuration) {

    }

    @Override
    public void supplementPluginConfig(PluginType pluginType, Configuration configuration) {

    }

    @Override
    public void supplementCoreConfig(Configuration configuration) {
        Integer channel = configuration.getInt(CoreConstant.DATAX_JOB_SETTING_SPEED_CHANNEL);
        if (channel == null) {
            configuration.set(CoreConstant.DATAX_JOB_SETTING_SPEED_CHANNEL, 5);
        }
    }

    @Override
    public void supplementJobConfig(Configuration configuration) {

    }

    @Override
    public boolean support(String type) {
        return false;
    }
}
